//
// ClockIRQAction.h
// Usage: Clock interrupt(IRQ0) action
// Create Date: 2009-04-20
// Creator: MaJiuyue
//
#ifndef _CLOCK_IRQACTION_H_
#define _CLOCK_IRQACTION_H_

#include <NewLife.h>
#include <LinkedList.h>
#include <time.h>
#include "IRQAction.h"
#include "Callout.h"

class ClockIRQAction : public IRQAction
{
private:
	LinkedList<Callout *> m_CalloutListHead;

public:
	static ClockIRQAction * GetInstance();
	void AddCallout(Callout *callout);
	void RemoveCallout(Callout *callout);
	virtual void operator() (u32 irq, regs_t *regs);

	time_t GetCMOSTime();
private:
	static ClockIRQAction * instance;
	ClockIRQAction();

};

#endif

